home *** CD-ROM | disk | FTP | other *** search
/ Developer Source 5 / developer source - volume 5.iso / dobbs / jun94 / tetef102.gif < prev    next >
Graphics Interchange Format  |  1997-01-13  |  93KB  |  570x472  |  4-bit (16 colors)
Labels: text | screenshot | font | number | rectangle | parallel
OCR: Given the following Scan Page Configurations (/SC) of: Page Configuration Comments Initialization Put one copy of MY_KEY into play Signaled The Reader Page Signaled The Writer Page 4 Cyclic Will signal page 2 when wanting to read 5 Interrupt Will signal page 3 when wanting to write Shared memory that must be protected from having two pages read/write at the same time Init Page SEND {MY KEY) Page 2 some code ... grab the shared Page 3 resource ... some code WAIT (MY_KEY) grab the shared ... got it, how read it resource ... how telease it. WAIT (MY_KRY) SEND (NY_KEY) ... got it. now write it rest of page 2. .. . now release it. SEND { MY_KEY) ... rest of page 3 Figure 2: Using signals to share/protect a resource from simultaneous reads/writes. Using the Name utility, define the name MY_KEY as a value of 400 so that SIGNAL(400) can be written as SIGNAL (MY_KEY). The ControlCalc command is /NU MY_KEY V 400.